home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / oji / nsILiveConnectManager.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  103 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  26.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37.  
  38. /**
  39.  * nsILiveConnectManager provides the necessary interfaces for initializing LiveConnect
  40.  * and provides services to the DOM.
  41.  */
  42.  
  43. #ifndef nsILiveConnectManager_h___
  44. #define nsILiveConnectManager_h___
  45.  
  46. #ifndef nsISupports_h___
  47. #include "nsISupports.h"
  48. #endif
  49. #ifndef JNI_H
  50. #include "jni.h"
  51. #endif
  52.  
  53. // {d20c8081-cbcb-11d2-a5a0-e884aed9c9fc}
  54. #define NS_ILIVECONNECTMANAGER_IID \
  55. { 0xd20c8081, 0xcbcb, 0x11d2, { 0xa5, 0xa0, 0xe8, 0x84, 0xae, 0xd9, 0xc9, 0xfc } }
  56.  
  57. // {d20c8083-cbcb-11d2-a5a0-e884aed9c9fc}
  58. #define NS_LIVECONNECTMANAGER_CID \
  59. { 0xd20c8083, 0xcbcb, 0x11d2, { 0xa5, 0xa0, 0xe8, 0x84, 0xae, 0xd9, 0xc9, 0xfc } }
  60.  
  61. struct JSRuntime;
  62. struct JSContext;
  63. struct JSObject;
  64.  
  65. class nsILiveConnectManager : public nsISupports {
  66. public:
  67.     NS_DEFINE_STATIC_IID_ACCESSOR(NS_ILIVECONNECTMANAGER_IID)
  68.     
  69.     /**
  70.      * Attempts to start LiveConnect using the specified JSRuntime.
  71.      */
  72.     NS_IMETHOD
  73.     StartupLiveConnect(JSRuntime* runtime, PRBool& outStarted) = 0;
  74.     
  75.     /**
  76.      * Attempts to stop LiveConnect using the specified JSRuntime.
  77.      */
  78.     NS_IMETHOD
  79.     ShutdownLiveConnect(JSRuntime* runtime, PRBool& outShutdown) = 0;
  80.  
  81.     /**
  82.      * Indicates whether LiveConnect can be used.
  83.      */
  84.     NS_IMETHOD
  85.     IsLiveConnectEnabled(PRBool& outEnabled) = 0;
  86.     
  87.     /**
  88.      * Initializes a JSContext with the proper LiveConnect support classes.
  89.      */
  90.     NS_IMETHOD
  91.     InitLiveConnectClasses(JSContext* context, JSObject* globalObject) = 0;
  92.     
  93.     /**
  94.      * Creates a JavaScript wrapper for a Java object.
  95.      */
  96.      NS_IMETHOD
  97.      WrapJavaObject(JSContext* context, jobject javaObject, JSObject* *outJSObject) = 0;
  98. };
  99.  
  100. ////////////////////////////////////////////////////////////////////////////////
  101.  
  102. #endif /* nsILiveConnectManager_h___ */
  103.